
import request from '@/utils/request';

// 新增执行策略管理
export async function add(params) {
  return request('/b/executionpolicy/add', {
    method: 'POST',
    data: params,
  });
}

// 删除执行策略管理
export async function deleteByIds(params) {
  return request('/b/executionpolicy/deleteByIds', {
    method: 'POST',
    data: params,
  });
}

// 查询执行策略管理列表(带分页)
export async function queryPageList(params) {
  return request('/b/executionpolicy/queryPageList', {
    method: 'POST',
    data: params,
  });
}

//启用停用任务
export async function setTaskStatus(params) {
  return request('/b/executionpolicy/setTaskStatus', {
    method: 'POST',
    data: params,
  });
}

// 修改执行策略管理
export async function update(params) {
  return request('/b/executionpolicy/update', {
    method: 'POST',
    data: params,
  });
}

export async function queryList(params) {
  return request('/b/dbgroup/queryList', {
    method: 'POST',
    data: params,
  });
}

export async function queryAuditTaskInfo(params) {
  return request('/b/executionpolicy/queryAuditTaskInfo', {
    method: 'POST',
    data: params,
  });
}

export async function immediateExecuteTask(params) {
  return request('/b/executionpolicy/immediateExecuteTask', {
    method: 'POST',
    data: params,
  });
}